public class VariableTrans {
    public static void main(String[] args) {
        // 自动类型提升
        int i = 10;
        float f = i;
        System.out.println(i);
        System.out.println(f);

        char c = 'a';
        System.out.println(c); // out: a
        System.out.println(c + 1);  //out:98    char不能像C语言那样，直接加实现字母偏移

        //强制类型转换
        float f0 = 100.9F;
        int i0 = (int) f0; // 截断法
        System.out.println(i0);

    }
}
